<template>
  <el-card class="card-body-np" id="el-card">
    <div style="text-align: center;padding: 15px;" v-if="datas.length === 0">
      暂无数据
    </div>
    <div v-for="(data, index) in datas" :key="index" class="enl-item" @click="$emit('selected-enter', data)">
      <p>{{data.basicTitle}}</p>
      <div class="list-footer-fs">
        <span>{{$formatDateTime(data.ctime)}}</span>
        <span class="fr">{{data.browseNumber}}</span>
        <span class="el-icon-view fr" style="padding-top: 3px;margin-right: 6px;"></span>
      </div>
    </div>
  </el-card>
</template>

<script>
  export default {
    title: 'data-list',
    props: {
      datas: {
        type: Array,
        default: function () {
          return []
        }
      }
    }
  }
</script>
<style>
  #el-card {
    border: none;
  }
  .enl-item {
    cursor: pointer;
    padding-bottom: 16px;
  }
  .enl-item p {
    margin: 15px 0 10px 0;
  }
  .enl-item:hover p {
    color: #94C05A;
  }
  .enl-item + .enl-item {
    border-top: 1px solid #D8D9D6;
  }
</style>
